# while
# num = 1
# while num <= 10:
#     print(num)
#     num += 1

# sum = 1
# num = 1
# while num <= 5:
#     sum *= num
#     num += 1
# print(sum)

# sum = 0
# num = 1
# while num <= 100:
#     sum += num
#     num += 1
# print(sum)

sum = 0
num = 1
while num <= 5:
    tmp = 1
    k = 1
    while k <= num:
        tmp *= k
        k += 1
    sum += tmp
    num += 1
print(sum)